#ifndef MYENEMY_H
#define MYENEMY_H

#include "SDL/SDL.h"

class MyEnemies;
struct enemyType;

/*! 
 *  \class MyEnemy
 *  \brief represents single enemy
 *  \author Peter Kosa
 *  \version 1.52
 *  \date    2006-2008
 */
class MyEnemy
{
public:
	MyEnemy();
	MyEnemy(double x, double y, enemyType *type, MyEnemies* parent);
	~MyEnemy();
  /*! moves this enemy to new position, calls shoot, if possible */
	bool move_enemy(int _t);
	/*! if the enemy can shoot, shoot */
	void enemy_shoot(int _t);
	/*! init this enemy on [x,y] */
	void init(double x,double y);
	/*! draw this enemy on the screen */
	void draw_enemy();
	/*! current position of movement phase in the sprite sheet */
	SDL_Rect* get_cur_rect();
	/*! get the rectangle in which the enemy can be hit - rect is abs on screen */
	SDL_Rect* get_hit_zone();
  /****ENCAPSULATION BEGIN********/
  /*! encapsulation */
	void set_pos_dx(double dx);
	/*! encapsulation */
	void set_pos_dy(double dy);
	/*! encapsulation */
	void set_speed_dx(double sx);
	/*! encapsulation */
	void set_speed_dy(double sy);
	/*! encapsulation */
	int get_life();
	/*! encapsulation */
	bool set_life(int);
	/*! encapsulation */
	enemyType* getType();
	/*! encapsulation */
	int get_damage();
/*******ENCAPSULATION END*******/	
private:
	double pos_x, pos_y, acc_x, acc_y, speed_x, speed_y, weaponAngle;
	int shotWaited, moveType, movement_phase, timeMoving, life;
	MyEnemies* parent;
	enemyType *thisEnemyType;	
	bool inposition;
};	
#endif

